home *** CD-ROM | disk | FTP | other *** search
- ; Tracker Tester - The BEST way to check the CIATrackerLibrary!
- ;
- ; Version 1.00
- ;
- ; Written by Crossbones/Binary Assault
- ; 06/11/1995
- ;
- ; Requires the following libraries to be used:
- ; -NeilsReqToolsLib.obj
- ; -RIAmosFuncLib.obj
- ; -CIATrackerLib.obj (Duuh!)
- ;
- WBStartup:NoCli
-
- Function DoRequest{text$}
- success=RTEZRequest("Tracker Tester",text$,"Yes|No")
- Function Return success
- End Function
-
- Function Decode{name$}
- worked=False
- If OpenFile(0,name$)
- FileInput 0
- size.l=Lof(0)
- If Reserve(0,size.l+5,%10)=0 Then End
- FileSeek 0,0
- ReadMem 0,Start(0),size.l
- PopInput
- worked=True
- EndIf
- CloseFile 0
- Function Return worked
- End Function
-
-
- WbToScreen 0
- WBenchToFront_
-
- BorderPens 2,1
- Borders On
-
- LoadFont 0,"topaz.font",8
- Window 0,50,50,400,400,$2|$4|$8|$1000,"CIA Tracker Library Test - Version 1.0",0,1,1
- WindowFont 0
-
- req$="First thing we need to do is find a"+Chr$(10)+"module to use. It must NOT be packed"+Chr$(10)+"in any form."
- success=RTEZRequest("Tracker Tester",req$,"OK!")
-
- filename$=RTEZLoadFile("Module to use?","")
-
- If OpenFile(0,filename$)
- CloseFile 0
- Else
- success=RTEZRequest("Tracker Test","Gosh! Was it that hard?","Weeell?!")
- CloseWindow 0
- End
- EndIf
-
- For w=0 To 8
- WCls
- WColour 1,0:WLocate 1,1
- NPrint "Currently Testing Slot#",Str$(w)
- NPrint ""
- FreeTrackerModule w
- Print"Loading Module : ":WColour 2,0
- If LoadTrackerModule(w,filename$)=False
- NPrint "Failed!":Goto Error
- EndIf
- NPrint"Passed."
- WColour 1,0
- Print"Valid Module : ":WColour 2,0
- If CheckTrackerID(w)=True
- NPrint"Passed."
- Else
- NPrint"Failed!"
- EndIf
- WColour 1,0
- Print"Playing Module : ":WColour 2,0
- success=StartTracker(w)
- a=DoRequest{"Is the module playing?"}
- If a=1
- NPrint"Passed."
- Else
- NPrint"Failed!"
- Pop If:Goto Error
- EndIf
- WColour 1,0
- StopTracker
- Print"Decoding Module: ":WColour 2,0
- FreeTrackerModule w
- If (Decode{filename$})=False
- NPrint"Failed!"
- Pop If:Goto Error
- Else
- NPrint"Passed."
- DecodeModule w,Start(0)
- EndIf
- WColour 1,0
- Print"Valid Module : ":WColour 2,0
- If CheckTrackerID(w)=True
- NPrint"Passed."
- Else
- NPrint"Failed!"
- EndIf
- WColour 1,0
- WColour 1,0
- Print"Playing Module : ":WColour 2,0
- success=StartTracker(w)
- a=DoRequest{"Is the module playing?"}
- If a=1
- NPrint"Passed."
- Else
- NPrint"Failed!"
- Pop If:Goto Error
- EndIf
- WColour 1,0
- Print"Number/patterns: ":WColour 2,0
- NPrint ModulePatterns(w)
- WColour 1,0
- Print"Jump Pattern : ":WColour 2,0
- trks=ModulePatterns(w):pos=Int(Rnd(1)*trks)+1
- ModulePositionJump pos
- a=DoRequest{"Did it just jump to another position?"}
- If a=1
- NPrint"Passed."
- Else
- NPrint"Failed!"
- Pop If:Goto Error
- EndIf
- WColour 1,0
- Print"Module Name : ":WColour 2,0
- name$=GetModuleName$(w)
- If name$=""
- NPrint"Failed! (Possible.)"
- Else
- Print "Passed. (":WColour 1,0:Print name$:WColour 2,0:NPrint")"
- EndIf
- WColour 1,0
- Print"Pause Module : ":WColour 2,0
- PauseModule
- a=DoRequest{"Did the module pause?"}
- PauseModule
- b=DoRequest{"Is the module playing again?"}
- If a=1 AND b=1
- NPrint "Passed."
- Else
- NPrint "Failed!"
- Pop If:Goto Error
- EndIf
- WColour 1,0
- Print"Volume Control : ":WColour 2,0
- For v=64 To 0 Step -1:VWait:TrackerVolume v:Next v
- a=DoRequest{"Did the volume go down?"}
- For v=0 To 64:VWait:TrackerVolume v:Next v
- b=DoRequest{"Did the volume go up?"}
- If a=1 AND b=1
- NPrint "Passed."
- Else
- NPrint "Failed!"
- Pop If:Goto Error
- EndIf
- WColour 1,0
- Print"Mask Control : ":WColour 2,0
- ChangeTrackerMask %1001
- a=DoRequest{"Is the tracker only playing on one side?"}
- ChangeTrackerMask %0110
- b=DoRequest{"Is it now playing only on the other side?"}
- ChangeTrackerMask %1111
- c=DoRequest{"Is it now playing on both sides?"}
- If a=1 AND b=1 AND c=1
- NPrint "Passed."
- Else
- NPrint "Failed!"
- Pop If:Goto Error
- EndIf
- WColour 1,0
- FreeTrackerModule w:FreeBank 0
- If w<>8
- NPrint""
- NPrint"** Press left mouse button to go on **"
- Else
- NPrint""
- NPrint" ** Test Finished! **"
- NPrint""
- NPrint"-Press left mouse button to exit-"
- EndIf
- ClickMouse
- Next w
- .Fin
- ClickMouse
- CloseWindow 0
- End
-
- .Error
- success=RTEZRequest("Tracker Tester","Failure during the test","Shit!")
- Goto Fin
-